// 年度预算
import request from "@/api/request";

// 查询所有年度预算
export const selete_year = (params) => {
    return request({
      url: "/fundmanage/YB/selectAll",
      method: "post",
      data: params,
    //   headers: { "Content-Type": "application/json" },
    });
  };

//   删除年度预算单
export const delete_year = (params) => {
    return request({
      url: "/fundmanage/YB/delete"+params,
      method: "post",
    //   data: params,
    //   headers: { "Content-Type": "application/json" },
    });
  };

  // 删除子表
  export const delete_son = (params) => {
    return request({
      url: "/fundmanage/YB/deleteDtl/"+params,
      method: "post",
    });
  };

//   新增预算单
export const add_year = (params) => {
    return request({
      url: "/fundmanage/YB/insert",
      method: "post",
      data: params,
      headers: { "Content-Type": "application/json" },
    });
  };

//   获取费用类别
export const get_gory = () => {
    return request({
      url: "/fundmanage/YB/getfCostCategoryId",
      method: "post",
    //   headers: { "Content-Type": "application/json" },
    });
  };

//   编辑预算单
export const update_year = (params) => {
    return request({
      url: "/fundmanage/YB/update",
      method: "post",
      data: params,
      headers: { "Content-Type": "application/json" },
    });
  };

//   查询某张单据详情
export const details_year = (params) => {
    return request({
      url: "/fundmanage/YB/selectDetails"+params,
      method: "post",
    //   data: params,
    //   headers: { "Content-Type": "application/json" },
    });
  };

//   提交单据
export const commit_year = (params) => {
    return request({
      url: "/fundmanage/YB/commit",
      method: "post",
      data: params,
      headers: { "Content-Type": "application/json" },
    });
  };

// 回退单据
export const undo_year = (params) => {
    return request({
      url: "/fundmanage/YB/scrap/undo",
      method: "post",
      data: params,
    //   headers: { "Content-Type": "application/json" },
    });
  };

//   审核单据
export const audit_year = (params) => {
    return request({
      url: "/fundmanage/YB/audit",
      method: "post",
      data: params,
      headers: { "Content-Type": "application/json" },
    });
  };

//   获取审核历史
export const history_year = (params) => {
    return request({
      url: "/fundmanage/YB/scrap/getAuditHistory",
      method: "post",
      data: params,
    //   headers: { "Content-Type": "application/json" },
    });
  };

//   作废单据
export const cancel_year = (params) => {
    return request({
      url: "/fundmanage/YB/scrap/cancel",
      method: "post",
      data: params,
    //   headers: { "Content-Type": "application/json" },
    });
  };

  // 经费单别编号列表
export const categorylist_cial = () => {
  return request({
    url: "/fundmanage/fc/ordCategoryList/1",
    method: "post",
    // data:params
    //   headers: { "Content-Type": "application/json" },
  });
};

// 上传附件
export const upload_year = (params) => {
  return request({
    url: "/fundmanage/fundAcc/upload",
    method: "post",
    data: params,
  });
};

// 查询附件列表
export const accessoryList_year = (params) => {
  return request({
    url: "/fundmanage/fundAcc/accessoryList/"+params,
    method: "post",
    //   headers: { "Content-Type": "application/json" },
  });
};

// 逻辑删除附件
export const deleteson_year = (params) => {
  return request({
    url: "/fundmanage/fundAcc/delete/"+params,
    method: "post",
    //   headers: { "Content-Type": "application/json" },
  });
};

// 下载附件
export const download_year = (params) => {
  return request({
    url: "/fundmanage/fundAcc/download",
    method: "post",
    data:params
    //   headers: { "Content-Type": "application/json" },
  });
};
